import request from 'h5/api/request/request'

//通过手机号码获取学生列表
export function getStudentList(params) {
    return request.get({
        apiName: '通过手机号码获取学生列表',
        url: '/student/student_role_by_mobile',
        params,
        loading: true,
    })
}

//公众号获取openid
export function getOpenid(params) {
    return request.post({
        apiName: '公众号获取openid',
        url: `${request.httpUrl['h5-api']}/we_chat_mp/authorize_user_info`,
        params,
        loading: false,
    })
}

//支付详情
export function getPayDetail(params) {
    return request.get({
        apiName: '支付详情',
        url: `${request.httpUrl['yyc-pay']}/payItem/detail/${params.id}`,
        loading: false,
    })
}

export function placeOrder(data) {
    return request.post({
        apiName: '下单',
        url: `${request.httpUrl['yyc-pay']}/cloundFlash/htmlOrder`,
        data,
        loading: true,
    })
}

export function qrCodeOrder(data) {
    return request.post({
        apiName: '二维码下单',
        url: `${request.httpUrl['yyc-pay']}/cloundFlash/qrCodeOrder`,
        data,
        loading: true,
    })
}
